﻿using System.Collections.Generic;
using System.Windows;
using Riba.MVVMSL;

namespace RIBA.Helper
{
	public static class Common
	{
		public static void RaiseShowMessageWindow(ViewModelBase vm, string message, string title)
		{
			var messageWindowButtons = new List<MessageWindowButton>();
			messageWindowButtons.Add(new MessageWindowButton { Caption = "OK" });
			Style windowStyle = null;
			if (Application.Current.Resources.Contains("ChildWindowStyle"))
				windowStyle = Application.Current.Resources["ChildWindowStyle"] as Style;

			var args = new ViewModelBase.ShowMessageWindowEventArgs(message, title, messageWindowButtons, null, windowStyle);
			vm.RaiseShowMessageWindow(args);
		}
	}
}
